/**
 * @author Macrydy
 * @date 2022/5/6
 */
public class Demo {

    public static void main(String[] args) {
        String s = String.valueOf(10);
        if (s instanceof String) {
            System.out.println("1");
        }

        Integer integer = Integer.valueOf(s);
        System.out.println(integer);


        Double d1 = new Double(3.2);
        Double d2 = new Double(5.36);
        System.out.println(d2.compareTo(d2));


        Integer i = 100;
        String str = "200";
        Integer integer1 = Integer.valueOf(str);
        System.out.println(i + integer1);

        int sum=getSum(100);
        System.out.println(sum);

        int mul=getMultiply(5);
        System.out.println("5的阶乘为："+mul);

    }

    private static int getMultiply(int i) {

        if (i==1) {
            return 1;
        }else {
            i = i * getMultiply(i - 1);
        }
        return i;
    }

    private static int getSum(int i) {

        if (i == 1) {
            return 1;
        }else {
            i = i + getSum(i - 1);
        }
        return i;
    }


}
